import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/readme',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children: [
                {
                    path: '/log',
                    component: resolve => require(['../components/page/log/Log.vue'], resolve)
                },
                {
                    path: '/goodspackage',
                    component: resolve => require(['../components/page/cashierProcess/GoodsWaterfall.vue'], resolve)
                },
                {
                    path: '/lessons',
                    component: resolve => require(['../components/page/Lessons/Lessons.vue'], resolve)
                },
                {
                    path: '/setlessons',
                    component: resolve => require(['../components/page/Lessons/SetLessons.vue'], resolve)
                },
                {
                    path: '/dormitories',
                    component: resolve => require(['../components/page/Dormitories/Dormitories.vue'], resolve)
                },
                {
                    path: '/setdormitories',
                    component: resolve => require(['../components/page/Dormitories/SetDormitories.vue'], resolve)
                },
                {
                    path: '/exam',
                    component: resolve => require(['../components/page/Exam/Exam.vue'], resolve)
                },
                {
                    path: '/addexam',
                    component: resolve => require(['../components/page/Exam/AddExam.vue'], resolve)
                },
                {
                    path: '/examscore',
                    component: resolve => require(['../components/page/Exam/ExamScore.vue'], resolve)
                },
                {
                    path: '/score',
                    component: resolve => require(['../components/page/Score/Score.vue'], resolve)
                },
                {
                    path: '/member',
                    component: resolve => require(['../components/page/cashierProcess/Member.vue'], resolve)
                },
/*会员管理*/
                {

                    path: '/membermanage',
                    component: resolve => require(['../components/page/memberManage/MemberManage.vue'], resolve),
                },
                {
                    name:'memberA',
                    path: '/memberInfo',
                    component: resolve => require(['../components/page/memberManage/MemberInfo.vue'], resolve)
                },
/*会员管理*/
                {
                    path: '/imgInfoList',
                    component: resolve => require(['../components/page/ImgInfoList.vue'], resolve)
                },
                {
                    path: '/search',
                    component: resolve => require(['../components/page/Search.vue'], resolve)
                },
                {
                    path: '/cashierBill',
                    component: resolve => require(['../components/page/cashierProcess/CashierBill.vue'], resolve)
                },
                {
                    path: '/bill',
                    component: resolve => require(['../components/page/cashierProcess/Bill.vue'], resolve)
                },
                {
                    path: '/recharge',
                    component: resolve => require(['../components/page/cashierProcess/MemberWaterfall.vue'], resolve)
                },
                {
                    path: '/cashierProcess',
                    component: resolve => require(['../components/page/cashierProcess/CashierProcess.vue'], resolve),
                },
                {
                    path: '/test',
                    component: resolve => require(['../components/page/test.vue'], resolve)
                },
                {
                    path: '/myshop',
                    component: resolve => require(['../components/page/myShop/Shop.vue'], resolve)
                },
                {
                    path: '/changePwd',
                    component: resolve => require(['../components/page/myShop/Password.vue'], resolve)
                },
                {
                    path: '/user',
                    component: resolve => require(['../components/page/user/User.vue'], resolve)
                },
                {
                    name: 'u',
                    path: '/user/info',
                    component: resolve => require(['../components/page/user/UserInfo.vue'], resolve)
                },
                {
                    path: '/role',
                    component: resolve => require(['../components/page/role/Role.vue'], resolve)
                },
                {
                    name: 'r',
                    path: '/role/info',
                    component: resolve => require(['../components/page/role/RoleInfo.vue'], resolve)
                },
                {
                    name: 'curve',
                    path: '/analysis',
                    component: resolve => require(['../components/page/analysis/Analysis.vue'], resolve)
                },
                {
                    path: '/report',
                    component: resolve => require(['../components/page/analysis/Report.vue'], resolve)
                },
                {
                    name: 'rd',
                    path: '/report/details',
                    component: resolve => require(['../components/page/analysis/ReportDetails.vue'], resolve)
                },
                {
                    path: '/bought',
                    component: resolve => require(['../components/page/analysis/Bought.vue'], resolve)
                },
                {
                    name: 'bd',
                    path: '/bought/details',
                    component: resolve => require(['../components/page/analysis/BoughtDetails.vue'], resolve)
                },
                {
                    path: '/deduction',
                    component: resolve => require(['../components/page/analysis/CurveEnter.vue'], resolve)
                },
                {
                    path: '/cash',
                    component: resolve => require(['../components/page/analysis/CurveEnter.vue'], resolve)
                },
                {
                    path: '/charge',
                    component: resolve => require(['../components/page/analysis/CurveEnter.vue'], resolve)
                },
                {
                    path: '/percentage',
                    component: resolve => require(['../components/page/percentage/Percentage.vue'], resolve)
                },
                {
                    path: '/employeeSet',
                    component: resolve => require(['../components/page/percentage/EmployeeSet.vue'], resolve)
                },
                {
                    path: '/addPosition',
                    component: resolve => require(['../components/page/percentage/AddPosition.vue'], resolve)
                },
                {
                    path: '/positionSet',
                    component: resolve => require(['../components/page/percentage/PositionSet.vue'], resolve)
                },
                {
                    path: '/toPositionSet',
                    component: resolve => require(['../components/page/percentage/ToPositionSet.vue'], resolve)
                },
                {
                    path: '/toEmployeeSet',
                    component: resolve => require(['../components/page/percentage/ToEmployeeSet.vue'], resolve)
                },
                {
                    path: '/addEmployee',
                    component: resolve => require(['../components/page/percentage/AddEmployee.vue'], resolve)
                },
/*优惠活动*/
                {
                    path: '/activity',
                    component: resolve => require(['../components/page/discount/Activity.vue'], resolve)
                },
                {
                    name:'activityA',
                    path: '/activityInfo',
                    component: resolve => require(['../components/page/discount/ActivityInfo.vue'], resolve)
                },
/*优惠活动*/
/*充值*/
                {
                    path: '/deposit',
                    component: resolve => require(['../components/page/deposit/Deposit.vue'], resolve)
                },
/*充值*/
                {
                    path: '/viewInventory',
                    component: resolve => require(['../components/page/goods/ViewInventory.vue'], resolve)
                },
                {
                    path: '/mainColumn',
                    component: resolve => require(['../components/page/mainColumn/MainColumn.vue'], resolve)
                },
                {
                    path: '/newColumn',
                    component: resolve => require(['../components/page/mainColumn/NewColumn.vue'], resolve)
                },
                {
                    path: '/newMess',
                    component: resolve => require(['../components/page/mainColumn/NewMess.vue'], resolve)
                },
                {
                    path: '/welcome',
                    component: resolve => require(['../components/page/Welcome.vue'], resolve)
                },
                {
                    path: '/organ',
                    component: resolve => require(['../components/page/organ/Organ.vue'], resolve)
                },
                {
                    name: 'or',
                    path: '/organ/info',
                    component: resolve => require(['../components/page/organ/OragnInfo.vue'], resolve)
                },
                // 入库单
                {
                    path: '/storage',
                    component: resolve => require(['../components/page/storage/Storage.vue'], resolve)
                },
                {
                    name: 'storage',
                    path: '/storage/info',
                    component: resolve => require(['../components/page/storage/StorageInfo.vue'], resolve)
                },
                // 入库选择仓库
                {
                    name: 'select',
                    path: '/select/list',
                    component: resolve => require(['../components/common/SelectComp.vue'], resolve)
                },
                // 出库单
                {
                    path: '/purchase',
                    component: resolve => require(['../components/page/purchase/Purchase.vue'], resolve)
                },
                {
                    name: 'purchase',
                    path: '/purchase/info',
                    component: resolve => require(['../components/page/purchase/PurchaseInfo.vue'], resolve)
                },
                {
                    path: '/allotBill',
                    component: resolve => require(['../components/page/allot/AllotBill.vue'], resolve)
                },
                {
                    name: 'allot',
                    path: '/allotBillInfo',
                    component: resolve => require(['../components/page/allot/AllotBillInfo.vue'], resolve)
                },
/*出库单*/
                {
                    path: '/delivery',
                    component: resolve => require(['../components/page/deliveryStorage/Delivery.vue'], resolve)
                },
                {
                    name:'goodsA',
                    path: '/deliveryInfo',
                    component: resolve => require(['../components/page/deliveryStorage/DeliveryInfo.vue'], resolve)
                },
 /*出库单*/
 /*选择商品组件*/
                {
                    name:'goodsB',
                    path: '/goodsComp',
                    component: resolve => require(['../components/common/GoodsComp.vue'], resolve)
                },
                {
                    path: '/goods/service',
                    component: resolve => require(['../components/page/goods/Goods.vue'], resolve)
                },
                {
                    name: 'g',
                    path: '/goods/info',
                    component: resolve => require(['../components/page/goods/GoodsInfo.vue'], resolve)
                },
                {
                    name: 'unpaid',
                    path: '/unpaid/settlement',
                    component: resolve => require(['../components/page/cashierProcess/UnpaidSettlement.vue'], resolve)
                },
                {
                    name: 'billlist',
                    path: '/billList',
                    component: resolve => require(['../components/page/cashierProcess/BillList.vue'], resolve)
                },
                {
                    path: '/hh',
                    component: resolve => require(['../components/page/cashierProcess/UnpaidGoodsWf.vue'], resolve)
                },
                {
                    path: '/allReport',
                    component: resolve => require(['../components/page/reportForm/AllReport.vue'], resolve)
                },
                {
                    path: '/dayReport',
                    component: resolve => require(['../components/page/reportForm/DayReport.vue'], resolve)
                },
                {
                    path: '/monthReport',
                    component: resolve => require(['../components/page/reportForm/MonthReport.vue'], resolve)
                },
                {
                    path: '/review',
                    component: resolve => require(['../components/page/review/Review.vue'], resolve)
                },
                {
                    name: 'review',
                    path: '/review/info',
                    component: resolve => require(['../components/page/review/ReviewInfo.vue'], resolve)
                },

/*选择商品组件*/

            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },


    ]
})
